<?php

/**
 * Model représentant un Message 
 */
class ZendChat_Model_Message {

    protected $_id;
    protected $_userlogin;
    protected $_text;
    protected $_date;

    function __construct($userlogin = null, $text = null, $date = null) {
        $this->_userlogin = $userlogin;
        $this->_text = $text;
        $this->_date = $date;
    }

    public function toArray() {
        return array(
            'userlogin' => $this->_userlogin,
            'text' => $this->_text,
            'date' => $this->_date
        );
    }

    /*
     * Getters & Setters
     * *************************************************************** */

    public function getId() {
        return $this->_id;
    }

    public function setId($id) {
        $this->_id = $id;
    }

    public function getUserlogin() {
        return $this->_userlogin;
    }

    public function setUserlogin($userlogin) {
        $this->_userlogin = $userlogin;
    }

    public function getText() {
        return $this->_text;
    }

    public function setText($text) {
        $this->_text = $text;
    }

    public function getDate() {
        return $this->_date;
    }

    public function setDate($date) {
        $this->_date = $date;
    }

}

